package com.ml.mall.service.sys;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ml.mall.bean.req.sys.SysPermissionDto;
import com.ml.mall.bean.req.sys.SysPermissionEditDto;
import com.ml.mall.bean.req.sys.SysPermissionNewDto;
import com.ml.mall.entity.sys.SysPermission;

import java.util.List;

/**
* <p>
    * 菜单权限表 服务类
    * </p>
*
* @author kyyang
* Created 2021-01-20
*/
public interface SysPermissionService extends IService<SysPermission> {

    /**
     * @description: 权限删除
     * @author kyyang
     * @date 2021/1/20 22:48
     * @version 1.0
     */
    int sysPermissionDel(List<Long> ids);

    /**
     * @description: 权限查询
     * @author kyyang
     * @date 2021/1/20 22:50
     * @version 1.0
     */
    IPage<SysPermission> sysPermissionByPage(SysPermissionDto sysPermissionDto);

    /**
     * @description: 权限新建
     * @author kyyang
     * @date 2021/1/20 22:53
     * @version 1.0
     */
    int sysPermissionNew(SysPermissionNewDto sysPermissionNewDto);

    /**
     * @description: 权限编辑
     * @author kyyang
     * @date 2021/1/20 23:04
     * @version 1.0
     */
    int sysPermissionEdit(SysPermissionEditDto sysPermissionEditDto);

    /**
     * 获取菜单下的所有权限
     * @param menuIds
     * @return
     */
    List<Integer> querySubPermissionIds(List<Integer> menuIds);
}
